package com.flyco.modules.stm.service;

import com.flyco.modules.stm.entity.StmDealerDiscount;
import com.baomidou.mybatisplus.extension.service.IService;
import com.flyco.modules.stm.entity.StmStoreInfo;
import com.flyco.modules.stm.model.DiscountApproveDTO;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import java.util.List;

/**
 * @Description: 经销商折扣表
 * @Author: flyco
 * @Date:   2024-04-11
 * @Version: V1.0
 */
public interface IStmDealerDiscountService extends IService<StmDealerDiscount> {

	/**
	 * 添加一对多
	 * 
	 */
	public void saveMain(StmDealerDiscount stmDealerDiscount) ;
	
	/**
	 * 修改一对多
	 * 
	 */
	public void updateMain(StmDealerDiscount stmDealerDiscount);
	
	/**
	 * 删除一对多
	 */
	public void delMain (String id);
	
	/**
	 * 批量删除一对多
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	/**
	 * 批量审核
	 */
	public void auditBatch (DiscountApproveDTO approveDTO);

	/**
	 * 批量编辑
	 */
	public void updateBatch (List<StmDealerDiscount> stmDealerDiscountList);

	/**
	 * 业务上一个时间内只有一个有效折扣记录，所以不考虑多条
	 * @return
	 */
	StmDealerDiscount getDiscountByStoreId(StmStoreInfo storeInfo);

	//根据经销商id和时间，获取折扣活动
	List<StmDealerDiscount> getDiscountByStoreIdAndTime(String storeIdList, Date startTime, Date endTime,String companyCode,String channelCode);
}
